<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="gmms" uri="/gmms-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<c:choose>
<c:when test="${loadData==null}">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>日志管理</title>
<jsp:include page="../head.jsp" />
</head>
<body>

<div class="info_right_main">
<form action="<%=path%>/log/log_queryList_listAction.action" method="post" id="refreshForm" name="refreshForm">
	<input type="hidden" id="currentPage" name="currentPage" value="${currentPage}"/>
    <c:if test='${fn:contains(authorityCode,",0001,") or fn:contains(authorityCode,",0005,")}'>
	        <div class="info_right_tab">
	        	<ul style="margin-top:30px;">
	            	<li style="width:70px;">菜单名称：</li>
	                <li><input type="text" id="menuName4Search" name="menuName" value="${menuName}" class="info_right_input" /></li>
	                <li style="width:70px;">操作人：</li>
	                <li><input type="text" id="loginName4Search" name="loginName" value="${loginName}" class="info_right_input" style='width:150px' /></li>
	                <li style="width:70px;">记录ID：</li>
	                <li><input type="text" id="recordId4Search" name="recordId" value="${recordId}" class="info_right_input" style='width:150px' /></li>
	            </ul>
	            <ul>
	            	<li style="width:70px;">时间&nbsp;&nbsp;从：</li>
	                <li><input type="text" id="startDate" class="info_right_input" name="startDate" value="${startDate}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',startDate:'%y-%M-%d',maxDate:'#F{$dp.$D(\'endDate\')||\'2020-10-01\'}'});" /></li>
	                <li style="width:70px;">至：</li>
	                <li><input type="text" id="endDate" name="endDate" value="${endDate}" class="info_right_input" style='width:150px' onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',startDate:'%y-%M-%d',minDate:'#F{$dp.$D(\'startDate\')}',maxDate:'2020-10-01'});" /></li>
	                <li style="width:140px;"><input class="btn" id="btnSearch" type="button" onclick="j_search(1);" value="查询" /> 
	                <input class="btn" onclick="j_search(1,true);" type="button" value="重置" /></li>
	            </ul>
		</div>
	</c:if>
</form>

<div class="info_right_ctrl">
    <input class="btn" type="button" value="导出EXCEL" />
    <input class="btn" type="button" onclick="j_search(1,true);" value="更新列表" />
    <span style="font-size:13px;padding-top:15px;float:right;padding-right:30px;cursor: pointer;" onclick="operationManual(${currentMenuId})">
    	<img src="<%=path %>/images/help.png" title="帮助" />帮助
    </span>
</div>

<div class="info_right_main">
	<div id="gridHead">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" style="TABLE-LAYOUT:fixed;">
		 	 <tr height="35">
	         <td width="100" align="center"><strong>序号</strong></td>
	         <td width="800" align="center"><strong>日志简要</strong></td>
	         <td width="150" align="center"><strong>日志时间</strong></td>
	         <td width="150" align="center"><strong>操作类型</strong></td>
	         <td width="150" align="center"><strong>操作人</strong></td>
	         <td width="200" align="center"><strong>菜单名称</strong></td>
	       </tr>
		</table>
	</div>
	<div style="overflow:auto;display:none;" id="divGrid">
	</div>
	<table border="0" cellspacing="0" cellpadding="0" width="100%" id="tablePager"></table>
     
</div>
        
</div>

</body>
</html>

</c:when>
<c:otherwise>

<table id="gridTable" width="100%" border="0" cellspacing="0" cellpadding="0">
	       <c:forEach items="${list}" var="log" varStatus="status">
				<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#f1f1f1';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="30" >
					<td>${status.index+1}</td>
					<td>${log.remark}</td>
					<td><fmt:formatDate value="${log.createTime}" pattern="yyyy-MM-dd HH:mm"/></td>
					<td>${log.opWay}</td>
					<td>${log.user.loginName}</td>
					<td>${log.menuName}</td>
				</tr>
			</c:forEach>
			<tr align="right" bgcolor="#f1f1f1">
				<td height="30" colspan="6" align="right">
				 <!-- 分页 -->
				 <gmms:pages currentPage="%{currentPage}" totalPage="%{totalPage}" />
				</td>
			</tr>
     </table>

</c:otherwise>
</c:choose>
